<template>
	<view class="content">
		<view class="app-title ac">
			<text class="fl" @click="back"><image class="back" src="/static/img/back.png"></image></text>问题验证
		</view>
		
		<view class="top-bg"></view>
		
		<view class="detail">
			<RadioGroup v-model="radio" direction="horizontal">
			  <Radio name="1">验证通过</Radio>
			  <Radio name="2">退回继续解决</Radio>
			</RadioGroup>
			<RadioGroup style='margin-top: 40px;' v-if="radio === '1'" v-model="radio1" direction="horizontal">
			  <Radio name="1">好</Radio>
			  <Radio name="2">一般</Radio>
			  <Radio name="3">差</Radio>
			</RadioGroup>
			<view v-if="radio === '2'" class="job-detail">退回原因：</view>
			<textarea v-if="radio === '2'" class="text" v-model="data_list.name"></textarea>
			<view class="btn">
				<button class="default-btn">提交</button>
			</view>
		</view>
		
		
	</view>
</template>

<script>
import { RadioGroup, Radio } from 'vant';

export default{
	components:{ RadioGroup, Radio  },
	data() {
		return {
			  radio: '1',
			  radio1:'1',
			data_list : {
				name : '',
				type : '请选择'
			},
			file_list : [],
			currentDate : '',
			currentDate2 : '',
			minDate : new Date(),
			show_picker:false,
			show_date: false,
			show_date2: false
		}
	},
	methods:{
		back() {
			uni.navigateBack();
		},
		afterRead(file) {
		    // 此时可以自行将文件上传至服务器
		    console.log(file);
		},
		onConfirm(value, index) {
			console.log(`当前值：${value}, 当前索引：${index}`);
			this.onCancel();
		},
		onCancel() {
			this.show_picker = false;
			this.show_date = false;
		},
		setDate() {
			let date = new Date(this.currentDate);
			if(this.show_date2){
				let str = date.getFullYear() +'/'+ ((date.getMonth()+1) < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) +'/'+ (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ' + (date.getHours() < 10 ? '0'+date.getHours():date.getHours()) +':'+(date.getMinutes()<10 ? '0'+date.getMinutes():date.getMinutes());
				this.currentDate2 = str;
			}else{
				let str = date.getFullYear() +'/'+ ((date.getMonth()+1) < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) +'/'+ (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
				this.currentDate = str;
			}
			this.onCancel();
		}
	}
}
</script>

<style scoped>
	
	.detail{
		padding-top: 24px;
		height: calc(100vh - 84px);
		padding-bottom: 16px;margin-top: -170px;
	}
	.job-detail{
		line-height: 45px;
	}
	.detail>.text{
		background: #F9FBFE;border: 1px solid #F1F1F1;border-radius: 6px;padding: 10px;font-size: 14px;height: 104px;overflow: auto;
	}
	.detail>.photo{
		overflow-x: auto;width: 100%;height: 100px;white-space: nowrap;
	}
	.detail>.photo>.img-item{
		width: 80px;height: 80px;margin-right: 10px;border-radius: 6px;display: inline-block;
	}
	.detail>.btn{
		position: absolute;
		bottom: 20px;
		left: 20px;
		right: 20px;
	}
	.detail>.btn>button{
		width: 100%;display: inline-block;
	}
	.van-cell{
		padding: 13px 16px;
	}
	.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after{
		border-top: 0px;
	}
</style>
